<%@ page import="com.lanou3g.HW_0517.pojo.User" %>
<%@ page import="java.util.ArrayList" %>
<%--
  Created by IntelliJ IDEA.
  User: dllo
  Date: 18/5/16
  Time: 下午5:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>result</title>
    <style>
        * {
            margin: 0;
            border: 0;
        }

        td {
            border: 1px solid black;
        }
    </style>
</head>
<body>
<%
    ArrayList<User> users = (ArrayList<User>) request.getAttribute("name");%>

<table>
    <tr>
        <td>用户名</td>
        <td>昵称</td>
        <td>爱好</td>
        <td>性别</td>

            <%for (User user : users) {%>
    <tr>
        <td><%=user.getUsername()%>
        </td>
        <td><%=user.getNickname()%>
        </td>
        <td><%=user.getHobby()%>
        </td>
        <td><%=user.getGender()%>
        </td>
    </tr>
        <%}%>

        <%if (users.size() == 0) {
    out.println("无查询结果");
    }%>

</body>
</html>
